<?php

// 网站基础设置项目
Redux::setSection($opt_name, array(
    'title' => __('基础设置', 'ifan_theme'),
    'id' => 'basic',
    'customizer_width' => '500px',
    'icon' => 'el el-wrench-alt',
    'desc' => '',

));

Redux::setSection($opt_name, array(
    'title' => __('全站设置', 'ifan_theme'),
    'id' => 'all_site_basic',
    'subsection' => true,
    'customizer_width' => '450px',
    'desc' => '',
    'fields' => array(
        // array(
        //     'id' => 'compact_switch_basic',
        //     'type' => 'switch',
        //     'title' => __('后台紧凑模式', 'ifan_theme'),
        //     'default' => false,
        // ),
        array(
            'id' => 'logo_basic',
            'type' => 'media',
            'url' => true,
            'title' => __('网站LOGO', 'ifan_theme'),
            'compiler' => 'true',
            'library_filter' => array(
                'jpg', 'png', 'svg', 'webp'

            ),
            'placeholder' => __('请正确输入图片地址', 'ifan_theme'),

            'desc' => __('', 'ifan_theme'),
            'subtitle' => __('推荐PNG格式或者SVG', 'ifan_theme'),
            'default' => array('url' => 'https://s.wordpress.org/style/images/codeispoetry.png'),

        ),
        array(
            'id' => 'logo_mini_basic',
            'type' => 'media',
            'url' => true,
            'title' => __('网站小LOGO', 'ifan_theme'),
            'compiler' => 'true',
            'library_filter' => array(
                'jpg', 'png', 'svg', 'webp'

            ),
            'placeholder' => __('请正确输入图片地址', 'ifan_theme'),

            'desc' => __('', 'ifan_theme'),
            'subtitle' => __('推荐PNG格式或者SVG', 'ifan_theme'),
            'default' => array('url' => 'https://s.wordpress.org/style/images/codeispoetry.png'),

        ),
        array(
            'id' => 'favicon_basic',
            'type' => 'media',
            'url' => true,
            'title' => __('网站favicon图标', 'ifan_theme'),
            'placeholder' => __('请正确输入图片地址', 'ifan_theme'),
            'compiler' => 'true',
            //'mode'      => false, // Can be set to false to allow any media type, or can also be set to any mime type.
            'desc' => __('', 'ifan_theme'),
            'subtitle' => __('<a href="https://tool.lu/favicon" target="_blank">在线制作</a>', 'ifan_theme'),
            'default' => array('url' => 'https://s.wordpress.org/style/images/codeispoetry.png'),

        ),
        // array(
        //     'id' => 'disable_gutengbao_switch_basic',
        //     'type' => 'switch',
        //     'title' => __('禁用古腾堡编辑器', 'ifan_theme'),
        //     'subtitle' => __('萝卜青菜各有所爱,古腾堡适合排版不适合代码编辑', 'ifan_theme'),
        //     'default' => true,
        // ),
        // array(
        //     'id' => 'comment_switch_basic',
        //     'type' => 'switch',
        //     'title' => __('全站禁止评论', 'ifan_theme'),
        //     'subtitle' => __('企业站点不需要评论', 'ifan_theme'),
        //     'default' => true,
        // ),
        // array(
        //     'id' => 'contribute_switch_basic',
        //     'type' => 'switch',
        //     'title' => __('全站禁止投稿', 'ifan_theme'),
        //     'subtitle' => __('企业站点不需要投稿', 'ifan_theme'),
        //     'default' => true,
        // ),
        // array(
        //     'id' => 'dialog_switch_basic',
        //     'type' => 'switch',
        //     'title' => __('侧边客服浮框', 'ifan_theme'),
        //     'subtitle' => __('客服信息来源于公司信息项里面所填写的内容', 'ifan_theme'),
        //     'default' => true,
        // ),
        // array(
        //     'id' => 'dialog_type_basic',
        //     'type' => 'image_select',
        //     'class' => 'dialog_type',
        //     'required' => array('dialog_switch_basic', '=', '1'),
        //     'title' => __('侧边客服浮框样式', 'ifan_theme'),
        //     'subtitle' => __('内置6种浮框样式', 'ifan_theme'),
        //     'desc' => __('', 'ifan_theme'),
        //     'width' => '150',
        //     'height' => '200',
        //     //Must provide key => value pairs for radio options

        //     'options' => array(
        //         '1' => array(
        //             'alt' => '1 Column',
        //             'img' => get_template_directory_uri() . '/assets/images/logo.png',
        //         ),
        //         '2' => array(
        //             'alt' => '2 Column Left',
        //             'img' => ReduxFramework::$_url . 'assets/img/2cl.png',
        //         ),
        //         '3' => array(
        //             'alt' => '2 Column Right',
        //             'img' => ReduxFramework::$_url . 'assets/img/2cr.png',
        //         ),
        //         '4' => array(
        //             'alt' => '3 Column Middle',
        //             'img' => ReduxFramework::$_url . 'assets/img/3cm.png',
        //         ),
        //         '5' => array(
        //             'alt' => '3 Column Left',
        //             'img' => ReduxFramework::$_url . 'assets/img/3cl.png',
        //         ),
        //         '6' => array(
        //             'alt' => '3 Column Right',
        //             'img' => ReduxFramework::$_url . 'assets/img/3cr.png',
        //         ),
        //     ),
        //     'default' => '2',
        // ),

        // array(
        //     'id' => 'notice_switch_basic',
        //     'type' => 'switch',
        //     'title' => __('登陆网站弹窗开启', 'ifan_theme'),
        //     'subtitle' => __('关闭后以下设置失效', 'ifan_theme'),
        //     'default' => false,
        // ),
        // array(
        //     'id' => 'notice_type_basic',
        //     'type' => 'select',
        //     'title' => __('弹窗样式', 'ifan_theme'),
        //     'required' => array('notice_switch_basic', '=', '1'),
        //     'subtitle' => __('内置3种弹窗样式，详情请查看<a href="">弹窗样式</a>', 'ifan_theme'),
        //     'desc' => __('', 'ifan_theme'),
        //     //Must provide key => value pairs for radio options
        //     'options' => array(
        //         '1' => '居中',
        //         '2' => '左下角',
        //         '3' => '右下角',
        //     ),
        //     'default' => '2',
        // ),
        // array(
        //     'id' => 'notice_title_basic',
        //     'type' => 'text',
        //     'title' => __('弹窗公告标题', 'ifan_theme'),
        //     'required' => array('notice_switch_basic', '=', '1'),
        //     'subtitle' => __('', 'ifan_theme'),
        //     'desc' => __('', 'ifan_theme'),
        //     'default' => '欢迎光临本站',
        // ),
        // array(
        //     'id' => 'notice_body_basic',
        //     'type' => 'editor',
        //     'title' => __('弹窗公告内容', 'ifan_theme'),
        //     'required' => array('notice_switch_basic', '=', '1'),
        //     'default' => '感谢使用爱范主题主题.',
        //     'args' => array(
        //         'wpautop' => false,
        //         'media_buttons' => false,
        //         'textarea_rows' => 5,
        //         //'tabindex' => 1,
        //         //'editor_css' => '',
        //         'teeny' => false,
        //         //'tinymce' => array(),
        //         'quicktags' => false,
        //     ),
        // ),
        // array(
        //     'id' => 'diy_header',
        //     'type' => 'textarea',
        //     'title' => __('头部自定义代码', 'ifan_theme'),
        //     'desc' => __('', 'ifan_theme'),
        //     'default' => '',
        //     'subtitle' => __('可以放置图片或者是广告，支持HTML代码', 'ifan_theme'),
        //     'allowed_html' => array(
        //         'a' => array(
        //             'href' => array(),
        //             'title' => array(),
        //         ),
        //         'br' => array(),
        //         'em' => array(),
        //         'strong' => array(),
        //     ),
        // ),
        // array(
        //     'id' => 'tongji_footer',
        //     'type' => 'textarea',
        //     'title' => __('统计代码', 'ifan_theme'),
        //     'desc' => __('', 'ifan_theme'),
        //     'default' => '',
        //     'subtitle' => __('统计网站流量，推荐使用百度统计，国内比较优秀且速度快；还可使用Google统计、CNZZ等', 'ifan_theme'),

        // ),
    ),

));
// 全站设置结束

Redux::setSection($opt_name, array(
    'title' => __('公司信息', 'ifan_theme'),
    'id' => 'company_info_base',
    'subsection' => __return_true(),
    'customizer_width' => '450px',
    'desc' => __(' ', 'ifan_theme'),
    'fields' => array(
        array(
            'id' => 'company_info_name_basic',
            'type' => 'text',
            'title' => __('公司名称', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
        ),
        array(
            'id' => 'company_info_address_basic',
            'type' => 'text',
            'title' => __('公司地址', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
            'allowed_html' => array(
                'a' => array(
                    'href' => array(),
                    'title' => array()
                ),
                'br' => array(),
                'em' => array(),
                'strong' => array()
            )
        ),
        array(
            'id' => 'company_info_code_basic',
            'type' => 'text',
            'title' => __('邮政编码', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
        ),
        array(
            'id' => 'company_info_linkman_basic',
            'type' => 'text',
            'title' => __('联系人', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
            'placeholder' => '联系人不应该太长',
        ),
        array(
            'id' => 'company_info_mobile_basic',
            'type' => 'text',
            'title' => __('手机号码', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
        ),
        array(
            'id' => 'company_info_tel_basic',
            'type' => 'text',
            'title' => __('电话号码', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
            'placeholder' => '请输入电话号码',
        ),
        array(
            'id' => 'company_info_tax_basic',
            'type' => 'text',
            'title' => __('传真号码', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
        ),
        array(
            'id' => 'company_info_mail_basic',
            'type' => 'text',
            'title' => __('电子邮箱', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
            'validate' => 'email',
        ),
        array(
            'id' => 'company_info_qq_basic',
            'type' => 'text',
            'title' => __('QQ号码', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
        ),
        array(
            'id' => 'company_info_license_basic',
            'type' => 'text',
            'title' => __('营业执照', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
        ),
        array(
            'id' => 'company_info_weixinp_basic',
            'type' => 'media',
            'url' => true,
            'title' => __('微信个人号', 'ifan_theme'),
            'compiler' => 'true',
            //'mode'      => false, // Can be set to false to allow any media type, or can also be set to any mime type.
            'desc' => __('', 'ifan_theme'),
            'subtitle' => __('推荐PNG格式宽度不应该超过300px', 'ifan_theme'),
            'default' => array('url' => ''),

        ),
        array(
            'id' => 'company_info_tuiguang_basic',
            'type' => 'text',
            'title' => __('推广链接', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
        ),
        array(
            'id' => 'company_info_beian_basic',
            'type' => 'text',
            'title' => __('网站备案号', 'ifan_theme'),
            'subtitle' => __('', 'ifan_theme'),
            'desc' => __('', 'ifan_theme'),
            'default' => '',
        ),
        array(
            'id' => 'company_info_weixinc_basic',
            'type' => 'media',
            'url' => true,
            'title' => __('微信公众号', 'ifan_theme'),
            'compiler' => 'true',
            //'mode'      => false, // Can be set to false to allow any media type, or can also be set to any mime type.
            'desc' => __('', 'ifan_theme'),
            'subtitle' => __('推荐PNG格式宽度不应该超过300px', 'ifan_theme'),
            'default' => array('url' => ''),

        ),

    ),

));
